varying vec4 gl_Color;
uniform float life;
uniform vec4 endColor;

void main(void)
{
	vec2 correctedCoord = (gl_TexCoord[0].xy-0.5)*2.0;
	float center = 1.0-abs(length(correctedCoord*2.5*(2-life)));
	float alpha = center*life;

	//gl_FragColor = vec4(gl_Color.rgb*(1.0+center*center*20*life*life*life*life)*(life+0.2), alpha);
	vec4 color = mix(endColor, gl_Color, life);
	gl_FragColor = vec4(color.rgb*(1.0+center), alpha*color.a);
	
}
    